#pragma once
#include "foundation/PxQuat.h"
#include "util/Helper.h"
#include "Vector3.h"

namespace Boon
{

	class Quaternion : public physx::PxQuat
	{
	public:
		Quaternion(void);
		Quaternion( float nx, float ny, float nz, float nw) : physx::PxQuat( nx, ny, nz, nw ) { }
		Quaternion( float angle, const Vector3& axis )
			: physx::PxQuat( angle * DegreeToRadians, axis ) { }

		inline float GetAngle() const
		{
			return this->getAngle() * RadiansToDegree;
		}

		inline Vector3 RotateVec( const Vector3& v )
		{
			physx::PxVec3 rotated = rotate( v );
			return Vector3( rotated.x, rotated.y, rotated.z );
		}

	};

}
